import request from '../utils/fetch'
//-------评价

//工头未评价列表
export function foremanNot(data) {
    return request({
        url: '/api/foreman/not/evaluation/record/list',
        method: 'get',
        loading: false,
        params: data
    })
}

//工头已评价列表
export function foremanYes(data) {
    return request({
        url: '/api/foreman/evaluation/customer/list',
        method: 'get',
        loading: false,
        params: data
    })
}

//工头收到的评价列表
export function foremanCompl(data) {
    return request({
        url: '/api/foreman/receive/project/evaluation/list',
        method: 'get',
        loading: false,
        params: data
    })
}

//工头收到的综合评价分
export function foremanAvg(data) {
    return request({
        url: '/api/foreman/receive/evaluation/score/avg',
        method: 'get',
        loading: false,
        params: data
    })
}

//工头评价所有
export function foremanAddAll(data) {
    return request({
        url: '/api/foreman/project/add/all/evaluation',
        method: 'Post',
        loading: false,
        data: data
    })
}

//工头评价工人
export function foremanAdd(data) {
    return request({
        url: '/api/foreman/project/add/evaluation',
        method: 'Post',
        loading: false,
        data: data
    })
}


//指定项目的所有工人列表(评价)
export function foremanProjectWorkerList(data) {
    return request({
        url: '/api/foreman/project/worker/list',
        method: 'get',
        loading: false,
        params: data
    })
}




//工人收到的综合评价分
export function workerAvg(data) {
    return request({
        url: '/api/worker/receive/evaluation/score/avg',
        method: 'get',
        loading: false,
        params: data
    })
}


//工人未评价列表
export function workerNotList(data) {
    return request({
        url: '/api/worker/not/evaluation/record/list',
        method: 'get',
        loading: false,
        params: data
    })
}

//工人已评价列表
export function workerIsList(data) {
    return request({
        url: '/api/worker/is/evaluation/record/list',
        method: 'get',
        loading: false,
        params: data
    })
}

//工人收到的评价列表
export function workerReceiveList(data) {
    return request({
        url: '/api/worker/receive/evaluation/record/list',
        method: 'get',
        loading: false,
        params: data
    })
}


//工人发布评价
export function workerAdd(data) {
    return request({
        url: '/api/worker/add/evaluation',
        method: 'Post',
        loading: false,
        data: data
    })
}
//工人收到的评价列表
export function history(data) {
    return request({
        url: '/api/worker/working/record/list',
        method: 'get',
        loading: false,
        params: data
    })
}